class Dog:
    def __init__(self,name,color,sex,type1):
        self.name = name
        self.color = color
        self.sex =sex
        self.type = type1
    def eat(self):
        print("%s在啃骨头"%self.name)
    def __del__(self):
        print("销毁程序执行")
    def __str__(self):
        return "这只狗叫%s它浑身是%s他是个%s他是一只%s"%(self.name,self.color,self.sex,self.type)
d1 = Dog("小不点","黑白色","弟弟","藏獒")
d1.eat()
print(d1)
